package customer

import (
	"counter-help/admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type CusOrderAssignmentsRouter struct{}

// InitCusOrderAssignmentsRouter 初始化 cusOrderAssignments表 路由信息
func (s *CusOrderAssignmentsRouter) InitCusOrderAssignmentsRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	cusOrderAssignmentsRouter := PublicRouter.Group("cusOrderAssignments").Use(middleware.OperationRecord())
	cusOrderAssignmentsRouterWithoutRecord := Router.Group("cusOrderAssignments")
	cusOrderAssignmentsRouterWithoutAuth := PublicRouter.Group("cusOrderAssignments")
	{
		cusOrderAssignmentsRouter.POST("createCusOrderAssignments", cusOrderAssignmentsApi.CreateCusOrderAssignments)             // 新建cusOrderAssignments表
		cusOrderAssignmentsRouter.DELETE("deleteCusOrderAssignments", cusOrderAssignmentsApi.DeleteCusOrderAssignments)           // 删除cusOrderAssignments表
		cusOrderAssignmentsRouter.DELETE("deleteCusOrderAssignmentsByIds", cusOrderAssignmentsApi.DeleteCusOrderAssignmentsByIds) // 批量删除cusOrderAssignments表
		cusOrderAssignmentsRouter.PUT("updateCusOrderAssignments", cusOrderAssignmentsApi.UpdateCusOrderAssignments)              // 更新cusOrderAssignments表
		cusOrderAssignmentsRouter.GET("getCusOrderAssignmentsByUserID", cusOrderAssignmentsApi.GetCusOrdersByUserID)              // 获取cusOrderAssignments表列表
	}
	{
		cusOrderAssignmentsRouterWithoutRecord.GET("findCusOrderAssignments", cusOrderAssignmentsApi.FindCusOrderAssignments)       // 根据ID获取cusOrderAssignments表
		cusOrderAssignmentsRouterWithoutRecord.GET("getCusOrderAssignmentsList", cusOrderAssignmentsApi.GetCusOrderAssignmentsList) // 获取cusOrderAssignments表列表
	}
	{
		cusOrderAssignmentsRouterWithoutAuth.GET("getCusOrderAssignmentsPublic", cusOrderAssignmentsApi.GetCusOrderAssignmentsPublic) // 获取cusOrderAssignments表列表
	}
}
